package com.rongsheng.mpchartdemo;

import com.github.mikephil.charting.components.AxisBase;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;

import java.util.List;

/**
 * 对字符串类型的坐标轴标记进行格式化
 * Created by lei on 2017/10/28 0028.
 */

class StringAxisValueFormatter implements IAxisValueFormatter {

    //区域值
    private List<String> mStrs;
    public StringAxisValueFormatter(List<String> value) {
        this.mStrs =value;
    }

    @Override
    public String getFormattedValue(float value, AxisBase axis) {
        return mStrs.get((int)value);
    }
}
